#include <pic18f2550.h>
#define FOSC 48000000
#include "simple_delay.h"
#include "fLCD3bSDCC.h"

#pragma config PLLDIV = 5, CPUDIV = OSC1_PLL2, USBDIV = 2
#pragma config FOSC = HSPLL_HS, FCMEN = ON, IESO = ON
#pragma config PWRT = ON, BOR = ON, BORV = 0, VREGEN = OFF


/*
__code char __at __CONFIG1L CONFIG1L = _PLLDIV_NO_DIVIDE__4MHZ_INPUT__1L & _CPUDIV__OSC1_OSC2_SRC___1__96MHZ_PLL_SRC___2__1L & _USBPLL_CLOCK_SRC_FROM_96MHZ_PLL_2_1L;
//code char at __CONFIG1H CONFIG1H = _OSC_HS__USB_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H;
__code char __at __CONFIG1H CONFIG1H = _OSC_XT__XT_PLL__USB_XT_1H & _FCMEN_ON_1H & _IESO_ON_1H;
	 //_FOSC_HS_1H _FOSC_HS_1H  //_OSC_HS__HS_PLL__USB_HS_1H
__code char __at __CONFIG2L CONFIG2L = _PUT_ON_2L & _BODEN_ON_2L & _BODENV_4_2V_2L & _VREGEN_ON_2L;
__code char __at __CONFIG2H CONFIG2H = _WDT_DISABLED_CONTROLLED_2H & _WDTPS_1_32768_2H;
__code char __at __CONFIG3H CONFIG3H = _CCP2MUX_RC1_3H & _PBADEN_PORTB_4_0__CONFIGURED_AS_DIGITAL_I_O_ON_RESET_3H & _LPT1OSC_ON_3H & _MCLRE_MCLR_ON_RE3_OFF_3H;
__code char __at __CONFIG4L CONFIG4L = _STVR_ON_4L & _LVP_OFF_4L & _ENHCPU_OFF_4L & _BACKBUG_OFF_4L;
__code char __at __CONFIG5L CONFIG5L = _CP_0_OFF_5L & _CP_1_OFF_5L & _CP_2_OFF_5L & _CP_3_OFF_5L;
__code char __at __CONFIG5H CONFIG5H = _CPB_OFF_5H;
__code char __at __CONFIG6L CONFIG6L = _WRT_0_OFF_6L & _WRT_1_OFF_6L & _WRT_2_OFF_6L & _WRT_3_OFF_6L;
__code char __at __CONFIG6H CONFIG6H = _WRTC_OFF_6H & _WRTB_OFF_6H;
__code char __at __CONFIG7L CONFIG7L = _EBTR_0_OFF_7L & _EBTR_1_OFF_7L & _EBTR_2_OFF_7L & _EBTR_3_OFF_7L;
__code char __at __CONFIG7H CONFIG7H = _EBTRB_OFF_7H;
*/


void main() {
    /* << agregue el código >> */
    delay_ms(500);
    delay_ms(500);
    lcd_init();
    lcd_send(LCD_COMMANDMODE, LCD_CLEAR);
	lcd_send(LCD_COMMANDMODE, LCD_LINE1);
	lcd_puts("  Automatismo para  ");
	lcd_send(LCD_COMMANDMODE, LCD_LINE2);
	lcd_puts("   medicion en inv. ");
	lcd_send(LCD_COMMANDMODE, LCD_LINE3);
	lcd_puts("   paleo-ambiental .");
	lcd_send(LCD_COMMANDMODE, LCD_LINE4);
	lcd_puts("   IGL UNAM - ITST  ");
        delay_ms(1000);
        delay_ms(1000);
}
